<template>
  <card>
    <template v-if="options.length > 0">
      <view class="m-bbs-item" v-for="(item, index) in options" :key="index">
        <item :option="item"></item>
      </view>
    </template>
    <view v-else style="padding: 40rpx 0;">
      <m-empty ></m-empty>
    </view>
  </card>
</template>

<script>
import Card from "../m-card/index.vue";
import Item from "./item.vue";

export default {
  props: {
    options: {
      type: Array,
      default: () => [],
    },
  },
  components: { Card, Item },
};
</script>

<style lang="scss" scoped>
.m-bbs-item {
  margin: 0 20rpx;
  margin-top: 20rpx;

  &:last-child {
    margin-bottom: 20rpx;
  }

  &:not(:first-child) {
    margin-top: 40rpx;
  }
}
</style>
